package com.dlws.modules.monitoring.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dlws.modules.monitoring.entity.ComputerInfo;
import com.dlws.modules.monitoring.entity.ComputerInfoPageVo;
import com.dlws.modules.monitoring.mapper.ComputerMapper;
import com.page.Pagination;
@Service
public class ComputerServiceImpl implements ComputerService {
	
	@Autowired
	private ComputerMapper computerMapper;
	@Override
	public ComputerInfo queryOne(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.selectOne(record);
	}

	@Override
	public List<ComputerInfo> queryAll(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.select(record);
	}

	@Override
	public int queryCount(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.selectCount(record);
	}

	@Override
	public ComputerInfo queryByPrimaryKey(Object key) {
		// TODO Auto-generated method stub
		return computerMapper.selectByPrimaryKey(key);
	}

	@Override
	public int add(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.insert(record);
	}

	@Override
	public int addSelective(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.insertSelective(record);
	}

	@Override
	public int delete(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.delete(record);
	}

	@Override
	public int deleteByPrimaryKey(Object key) {
		// TODO Auto-generated method stub
		return computerMapper.deleteByPrimaryKey(key);
	}

	@Override
	public int updateByPrimaryKey(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.updateByPrimaryKey(record);
	}

	@Override
	public int updateByPrimaryKeySelective(ComputerInfo record) {
		// TODO Auto-generated method stub
		return computerMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int queryCountByExample(ComputerInfo example) {
		// TODO Auto-generated method stub
		return computerMapper.selectCountByExample(example);
	}

	@Override
	public List<ComputerInfo> queryByExample(ComputerInfo example) {
		// TODO Auto-generated method stub
		return computerMapper.selectByExample(example);
	}

	@Override
	public Pagination pagelist(ComputerInfoPageVo computerInfo) {
		// TODO Auto-generated method stub
		Pagination pagination = new Pagination(computerInfo.getPageNo(), computerInfo.getPageSize(), pagecount(computerInfo));
		pagination.setList(computerMapper.pagelist(computerInfo));
		return pagination;
	}

	@Override
	public int pagecount(ComputerInfoPageVo computerInfo) {
		// TODO Auto-generated method stub
		return computerMapper.pagecount(computerInfo);
	}
		
	}
	

